Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
Obtener [objeto Objeto] al intentar guardar elementos en AWS DynamoDB

Estoy creando una aplicación en la que quiero guardar datos en Dynamodb de AWS. La primera vez que funciona. Después de eliminar los elementos que tenía en Dynamodb, aparece el error [objeto Objeto]. no se que mas hacer. Además de eso, actualizo los archivos de mutación para agregar dos elementos más. Cuando probé con el código original que funciona al principio, no funciona. ¡Gracias y siento molestarte!

 import React, { useEffect, useState } from "react"; import Amplify, { API, graphqlOperation } from "aws-amplify"; import { createTodo } from "./graphql/mutations"; import { listTodos } from "./graphql/queries"; import awsExports from "./aws-exports"; Amplify.configure(awsExports); const initialState = { name: "", description: "", username: "", lastname: "" }; const App = () => { const [formState, setFormState] = useState(initialState); const [todos, setTodos] = useState([]); useEffect(() => { fetchTodos(); }, []); function setInput(key, value) { setFormState({ ...formState, [key]: value }); } async function addTodo() { try { if (!formState.name || !formState.description) return; const todo = { ...formState }; setTodos([...todos, todo]); setFormState(initialState); await API.graphql(graphqlOperation(createTodo, { input: todo })); } catch (err) { alert(err); } } return ( <div style={styles.container}> <h2>Amplify Todos</h2> <input onChange={(event) => setInput("name", event.target.value)} style={styles.input} value={formState.name} placeholder="Name" /> <input onChange={(event) => setInput("description", event.target.value)} style={styles.input} value={formState.description} placeholder="Description" /> <input onChange={(event) => setInput("username", event.target.value)} style={styles.input} value={formState.username} placeholder="Username" /> <input onChange={(event) => setInput("lastname", event.target.value)} style={styles.input} value={formState.lastname} placeholder="Lastname" /> <button style={styles.button} onClick={addTodo}> Create Todo </button> </div> ); };```
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!